! DemoFourWheels.alt 
! Plot several profiles on the same graph to show
! how the gear ratio influences the shape.

! In this demonstration, we use millimeter units.

! Create a window for the plot(s)

	VAR g := GraphWindow.new[4096]
		.at[400, 400]
		.setName['Tooth shape vs gear ratio']

! Specify the plot window range and scaling

	! Note that the dot pitch of 1/90 inch must
	! be converted to mm here:

	g.setPitch[25.4/90.0]
	g.setMag[100.0]

! Create some wheel blanks

	VAR w0 := Wheel.new
	VAR w1 := Wheel.new
	VAR w2 := Wheel.new
	VAR w3 := Wheel.new

! Design four wheels

	w0.setGeometry[0.3, 96, 16]
	w0.generate[200]

	w1.setGeometry[0.3, 96, 12]
	w1.generate[200]

	w2.setGeometry[0.3, 96,  8]
	w2.generate[200]

	w3.setGeometry[0.3, 96,  6]
	w3.generate[200]

! Clear the window

	g.clear

! Plot each of the wheels

	w0.plot[g]
	w1.plot[g]
	w2.plot[g]
	w3.plot[g]

! Draw the window

	g.draw



